@import 'src/theme/mixins';

.editor_container {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;

  .editor_top {
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    color: #a6a8b1;
    border-bottom: solid 1px #ddd;
    text-align: center;
  }

  .editor_section {
    display: flex;
    flex: 1;
    position: relative;
  }

  .editor_body {
    overflow-y: auto;
    height: calc(100vh - 60px - 64px);
    flex: 1;
    background-color: #f0f3f4;
    @include scrollbar();
    display: flex;
    flex-direction: column;

    .editor_body_content {
      flex: 1;
      position: relative;

      .editor_body_bg{
        position: absolute;
        width: 100%;
        height: 100%;
      }
    }


    .image_chart {
      display: flex;
      justify-content: center;
      align-items: center;
      color: #a5a5a5;
      font-size: 20px;
      overflow: hidden;
      img {
        width: 100%;
        height: 100%;
      }
    }
  }

  .editor_panel {
    position: relative;
    width: 410px;
    min-width: 410px;
    height: calc(100vh - 60px - 64px);

    border-left: solid 1px #ddd;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    @include scrollbar();

    &.fix {
      position: absolute;
      right: 0;
      bottom: 0;
    }

    .data_model_field_holder{
      border: 1px dashed  #ccc;
      min-height: 20px;
      padding: 4px 3px;
      .add_btn{
        width: 100%;
        text-align: center;
        height: 24px;
        display: flex;
        align-items: center;
      }

      .green_btn{
        cursor: pointer;
        font-size: 20px;
        color: $green;
      }
      .data_set_field{
        position: relative;
        border: 1px dashed gray;
        margin-bottom: 0.5rem;
        background-color: rgb(76, 141, 216);
        color: rgb(255, 255, 255);
        border-radius: 2px;
        padding-left: 5px;
        font-size: 12px;
        height: 27px;
        line-height: 27px;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        .bdhshanchu{
          font-size: 14px;
          position: absolute;
          top: 0;
          right: 4px;
          cursor: pointer;
        }
        span{
          &:first-child{
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
            padding-right: 11px;
          }
        }
      }
    }
    .editor_panel_title {
      text-align: left;
      background-color: #f0f3f4;
      font-size: 14px;
      padding: 0 15px;
      height: 50px;
      line-height: 50px;
      display: flex;
      justify-content: space-between;

      .editor_panel_title_btn {
        font-weight: 800;
      }
    }

    .editor_panel_content {
      padding: 15px 0 0 15px;
      height: calc(100vh - 175px);

      .font_style {
        display: flex;
        flex-wrap: wrap;

        button {
          width: auto;
          height: auto;
          border: 1px dashed #ddd;
          padding: 5px;
          border-radius: 0;
          margin: 5px 5px 0 0;

          span {
            font-size: 16px;
          }
        }
        .btn_hover {
          color: $green;
          border-color: $green;
        }
      }

      .choose_image {
        width: 100%;
        height: 300px;
        line-height: 300px;
        border: 2px solid #cfdadd;
        font-size: 23px;
        text-align: center;
        color: #58666e;
        background: #f0f3f4;
        cursor: pointer;
        position: relative;
        &:hover {
          border-color: #3E4357;
          background-color: #bbb;
          span.image_hide{
            display: block;
          }
        }
        img{
          width: 100%;
          height: 100%;
          object-fit: contain;
        }
        span{
          position: absolute;
          width: 100%;
          height: 100%;
          top: 0;
          left: 0;
          &.image_hide{
            display: none;
          }
        }
      }


    }

    .dragLine {
      position: absolute;
      top: 0;
      left: 0;
      width: 8px;
      height: 100%;
      cursor: w-resize;
    }
  }

  .editor_panel_title_fix {
    z-index: 20;
    display: block;
    height: 100%;
    cursor: pointer;
    padding: 10px;
    font-size: 20px;
    text-align: center;
    background-color: #e8e8e8;
    margin: 0 auto;
    border-left: 1px solid #c5c5c5;
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50px;
    writing-mode: horizontal-tb;
  }

  .devideLine {
    margin: 0 15px;
    width: 1px;
    height: 24px;
    background: #ddd;
  }

  .top_row {
    padding: 0 15px 0 0;
    height: 100%;
    flex-wrap: nowrap;
  }

  .activeCharts {
    border: .5px solid $green !important;
  }
}

:global {
  .filter_field_modal {
    .filter_field_modal_checkbox {
      height: 200px;
      overflow-y: scroll;
      width: 100%;

      .ant-checkbox-wrapper {
        display: block;
      }
    }

    .filter_field_modal_radio {
      margin-top: 16px;

      .ant-radio-wrapper {
        display: block;
      }
    }

    .filter_field_modal_date {
      padding: 20px;
      border: 1px solid #ddd;
      border-radius: 4px;

      .ant-form-item-label {
        text-align: left;
      }
    }
  }

  .ant-modal-body{
    .image_selector_body {
      overflow: hidden;
      overflow-y: auto;
      width: 100%;
      margin-top: 5px;
      border: 2px solid #cfdbdc;
      border-radius: 2px;
      padding: 8px;
      max-height: 65vh;

      .image_selector_dummy {

        float: left;
        position: relative;
        margin: 20px;
        background-color: #f0f3f4;
        overflow: hidden;
        border: 1px solid #cfdadd;

        img {
          height: 150px;
          width: 200px;
          object-fit: contain;
          cursor: pointer;
        }
      }
    }
  }
}
:global {
  .ant-table-column-sorters-with-tooltip, .ant-table-column-sorters, .ant-table-column-sorters>span {
    text-decoration: inherit;
  }
}
:global {
  .ant-collapse-content {
    overflow: initial !important;
  }
  .data_set_fields{
    border: 1px solid #ddd;
    height: 400px;
    overflow-y: scroll;
    div{
      cursor: pointer;
      border-radius: 3px;
      &:hover{
        background: rgba(134, 188, 37, 0.14);
      }
      &.field{
        padding-left: 40px;
      }
      span{
        &:last-child{
          margin-left: 5px;
        }
      }
    }
  }
}